get key(s) for min value in dict python

34

# works with multiple equal minimal values
minval = min(d.values())
res = list(filter(lambda x: d[x]==minval, d))

Comments

Submit
0 Comments